package com.cloud.quickcore.admin.dto;

import com.cloud.quickcommon.biz.BaseBizConvert;
import com.cloud.quickcore.admin.entity.SysUser;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 注册信息--前端交互
 * @author NiJo_H
 * @version 1.0
 * @date 2019/7/30 21:46
 */
@Data
public class UserRegisterDto implements BaseBizConvert<SysUser> {
    @ApiModelProperty(value = "用户名",required = true)
    private String userName;

    @ApiModelProperty(value = "密码",required = true)
    private String password;

    @ApiModelProperty(value = "再次确认密码",required = true)
    private String againPassword;

    @ApiModelProperty(value = "电子邮箱",required = true)
    private String email;

    @Override
    public SysUser convertEntity() {
        SysUser sysUser=new SysUser();
        sysUser.setName(userName);
        sysUser.setPassword(password);
        sysUser.setEmail(email);
        sysUser.setUsername(userName);
        return sysUser;
    }
}
